package com.zmn.plat.dubbo.interfaces.part;

import java.util.List;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;

import com.zmn.common.dto.VtDTO;
import com.zmn.common.dto2.ResponseDTO;
import com.zmn.plat.common.dto.part.PartSkuDIO;
import com.zmn.plat.common.dto.part.PartSkuDRO;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

/**
 * 配件查询远程服务
 *
 * @author xiangjunming
 * @since 2019/03/27 10:18:54
 */
@Api(value = "配件服务", tags = {"配件"})
public interface PartSkuListRemoteService {
    /**
     * 描述:通过配件ID获取配件详情
     *
     * @param skuId
     *            Integer
     * @return ResponseDTO<PartSkuDRO>
     * @author DaiZhichao
     * @since 2018/10/31 11:18
     */
    @ApiOperation(value = "通过配件ID获取配件详情", response = ResponseDTO.class, tags = {"详情"})
    ResponseDTO<PartSkuDRO> getBySkuId(@NotNull(message = "skuId不能为空") @Positive(message = "skuId必须为大于0的正整数") @ApiParam(value = "配件ID", required = true) Integer skuId);

    /**
     * 描述:通过配件ID列表获取配件列表信息
     *
     * @param ids
     *            List<Integer>
     * @return ResponseDTO<PartSkuDRO>
     * @author DaiZhichao
     * @since 2018/10/31 11:20
     * @Size(min = 1, max = DubboConsts.MAX_PARAM_LENGTH, message = "ids参数不能为空且个数不能超过"+DubboConsts.MAX_PARAM_LENGTH)
     *
     */
    @ApiOperation(value = "通过配件ID列表获取配件列表信息", response = ResponseDTO.class, tags = {"列表"})
    ResponseDTO<List<PartSkuDRO>> listBySkuIds(@NotEmpty(message = "ids参数不能为空") @ApiParam(value = "配件ID集合", required = true) List<Integer> ids);

    /**
     * 描述:通过PartSkuDIO获取配件详情
     *
     * @param query
     *            PartSkuDIO
     * @return ResponseDTO<PartSkuDRO>
     * @author DaiZhichao
     * @since 2018/10/31 11:20
     */
    @ApiOperation(value = "通过PartSkuDIO获取配件详情", response = ResponseDTO.class, tags = {"详情"})
    ResponseDTO<List<PartSkuDRO>> listPageByQuery(@NotNull(message = "入参不能为空") @Valid @ApiParam(value = "入参", required = true) PartSkuDIO query);

    /**
     * 描述:通过PartSkuDIO在ESz中模糊查询配件简单信息
     *
     * @param partSkuDIO
     *            PartSkuDIO
     * @return ResponseDTO<PartSkuDRO> msg = count
     * @author DaiZhichao
     * @since 2018/10/31 11:20
     */
    @ApiOperation(value = "通过PartSkuDIO在ESz中模糊查询配件简单信息", response = ResponseDTO.class, tags = {"列表"})
    ResponseDTO<List<PartSkuDRO>> listPageByEsSearch(@NotNull(message = "入参不能为空") @Valid @ApiParam(value = "入参", required = true) PartSkuDIO partSkuDIO);

    /**
     * 描述: 通过配件分类ID获取配件列表信息
     *
     * @param categoryId
     *            Integer
     * @return ResponseDTO<PartSkuDRO>
     * @author DaiZhichao
     * @since 2018/10/31 11:20
     */
    @ApiOperation(value = "通过配件分类ID获取配件列表信息", response = ResponseDTO.class, tags = {"列表"})
    ResponseDTO<List<PartSkuDRO>> listByCategoryId(@NotNull(message = "categoryId不能为空") @Positive(message = "categoryId必须为大于0的正整数") @ApiParam(value = "分类id", required = true) Integer categoryId);

    /**
     * 描述:通过PartSkuDIO获取配件简单列表
     *
     * @param categoryId
     *            分类Id
     * @return ResponseDTO<VtDTO>
     * @author DaiZhichao
     * @since 2018/10/31 11:20
     */
    @ApiOperation(value = "通过PartSkuDIO获取配件简单列表", response = ResponseDTO.class, tags = {"列表"})
    ResponseDTO<List<VtDTO>> listVtDTOByCategoryId(@NotNull(message = "categoryId不能为空") @Positive(message = "categoryId必须为大于0的正整数") @ApiParam(value = "分类id", required = true) Integer categoryId);

    /**
     * 描述: 配件联想通过text/配件名称描述等文本查询配件
     *
     * @param text
     *            String
     * @return ResponseDTO<VtDTO> value=skuId text=skuName
     * @author XiangJunMing
     * @since 2018/11/22 16:04
     */
    @ApiOperation(value = "配件联想通过text/配件名称描述等文本查询配件", response = ResponseDTO.class, tags = {"列表"})
    ResponseDTO<List<VtDTO>> listByText(@NotBlank(message = "text不能为空") @ApiParam(value = "文本", required = true) String text);

}
